<?php

$oReq = &App::getRequest();
$oTpl = &App::getTemplate();
$aReasons = array();
$bNoRedirect = false;
$sType = $oReq->get('type');

if ( eregi('param', $sType) )
{
	$bNoRedirect = true;
	$aParam = explode("-", $sType);
	if ( isset($aParam[1]) && (App::getUser('type') == '0' || App::getUser('type') == '1') )
	{
		$sContent = App::format('Mod_Account.warning_feature_param', $aParam[1]);
	}
}

if ( $sType == 'denied' )
{
	$bNoRedirect = true;
}

if ( empty($sContent) )
{
	if ( !$bNoRedirect && App::getParam('sub_system') )
	{
		App::gotoUrl('public.subscribe', array());
	}

	$sContent = App::format('Mod_Account.feature_module_offline');
	$aReasons[] = App::format('Mod_Account.membership_perm_fail');
	$aReasons[] = App::format('Mod_Account.feature_module_staff');
	$aReasons[] = App::format('Mod_Account.feature_module_working');
}

$oTpl->assign(array
(
	'sContent' => $sContent,
	'aItems' => (isset($aReasons) ? $aReasons : ''),
));

?>